<html>
	<head>
		<title>Login</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	</head>
	<body>
		<p>----------1 test if----------</p>
		<p>assign age to 25</p>
		<#assign age=25/>
		<#if (age>60)>laonian
		<#elseif (age>40)>zhongnian
		<#elseif (age>20)>qingnian
		<#else>shaonianren
		</#if>
		<hr>
		<p>----------2 test switch----------</p>
		<p>assign level to 20</p>
		<#assign level='20'/>
		<#switch level> 
        <#case '20'>level 2<#break> 
        <#case '50'>level 5<#break> 
        <#default>level unknown 
        </#switch>
        <hr>
        <p>----------2 test list----------</p>
        <#list ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"] as x>
               ${x_index + 1}.${x}<#if x_has_next><br/></#if>
               <#if x = "星期四"><#break></#if>
        </#list>
        <hr>
        <p>----------3 test inlcude----------</p>
        <#include "/WEB-INF/ftls/login.ftl">
        <hr>
        <p>----------4 test assign map----------</p>
        <#assign person={"name":"Tom","age":20,"address":"上海"}/>
        <#assign param="age"/>
                我的名字叫${person.name},我今年${person.age},我家住在${person.address}<br>
        person[param]:${person[param] * 8}
        <hr>
        <p>----------5 test noparse----------</p>
        <#noparse>${person.name}</#noparse>
        <#assign lastUpdated = "2009-01-07 15:05"?datetime("yyyy-MM-dd HH:mm")>
        <hr>
        <p>----------6 test 插值结果为日期值----------</p>
        ${lastUpdated?string("yyyy-MM-dd HH:mm:ss zzzz")}<br/>
        ${lastUpdated?string("EEE,MMM d,yy")}<br/>
        ${lastUpdated?string("EEEE,MMMM dd,yyyy,hh:mm:ss a '('zzz')'")}<br/>
        ${lastUpdated?string.short}<br/>
        ${lastUpdated?string.long}<br/>
        ${lastUpdated?string.full}<br/>
        <hr>
        <p>----------7 test 数字格式化插值----------</p>
        <#assign x=2.582/>
        <#assign y=4/>
        #{x; M2}<br/>
        #{y; M2}<br/>
        #{x; m2}<br/>
        #{y; m2}<br/>
        #{x; m1M2}<br/>
        #{y; m1M2}<br/>
        <hr>
        <p>----------8 test 截取字符串----------</p>
        <#assign book = "疯狂java讲义"/>
        ${book}<br/>
        ${book[0]}<br/>
        ${book[0..2]}<br/>
        <hr>
        <p>----------9 test 测试日期----------</p>
        <#assign testDate = "2009-01-22 17:23:45"?datetime("yyyy-MM-dd HH:mm:ss")/>
        <#if testDate??>${testDate?string("yyyy-MM-dd")}</#if>
	</body>
</html>